\(\int \frac {x (a+b \log (c x^n))}{(d+e x)^3} \, dx\) [48]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 62 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx=-\frac {b n}{2 e^2 (d+e x)}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d (d+e x)^2}-\frac {b n \log (d+e x)}{2 d e^2} \]

[Out]

-1/2*b*n/e^2/(e*x+d)+1/2*x^2*(a+b*ln(c*x^n))/d/(e*x+d)^2-1/2*b*n*ln(e*x+d)/d/e^2

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2373, 45} \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx=\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d (d+e x)^2}-\frac {b n}{2 e^2 (d+e x)}-\frac {b n \log (d+e x)}{2 d e^2} \]

[In]

Int[(x*(a + b*Log[c*x^n]))/(d + e*x)^3,x]

[Out]

-1/2*(b*n)/(e^2*(d + e*x)) + (x^2*(a + b*Log[c*x^n]))/(2*d*(d + e*x)^2) - (b*n*Log[d + e*x])/(2*d*e^2)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2373

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp
[(f*x)^(m + 1)*(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])/(d*f*(m + 1))), x] - Dist[b*(n/(d*(m + 1))), Int[(f*x)^
m*(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && EqQ[m + r*(q + 1) + 1, 0] && NeQ[
m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d (d+e x)^2}-\frac {(b n) \int \frac {x}{(d+e x)^2} \, dx}{2 d} \\ & = \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d (d+e x)^2}-\frac {(b n) \int \left (-\frac {d}{e (d+e x)^2}+\frac {1}{e (d+e x)}\right ) \, dx}{2 d} \\ & = -\frac {b n}{2 e^2 (d+e x)}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d (d+e x)^2}-\frac {b n \log (d+e x)}{2 d e^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.21 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx=\frac {b n \log (x)-\frac {b d n (d+e x)+a d (d+2 e x)+b d (d+2 e x) \log \left (c x^n\right )+b n (d+e x)^2 \log (d+e x)}{(d+e x)^2}}{2 d e^2} \]

[In]

Integrate[(x*(a + b*Log[c*x^n]))/(d + e*x)^3,x]

[Out]

(b*n*Log[x] - (b*d*n*(d + e*x) + a*d*(d + 2*e*x) + b*d*(d + 2*e*x)*Log[c*x^n] + b*n*(d + e*x)^2*Log[d + e*x])/
(d + e*x)^2)/(2*d*e^2)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(136\) vs. \(2(56)=112\).

Time = 0.41 (sec) , antiderivative size = 137, normalized size of antiderivative = 2.21

method result size
parallelrisch \(\frac {\ln \left (x \right ) b \,e^{2} n \,x^{2}-\ln \left (e x +d \right ) b \,e^{2} n \,x^{2}+2 \ln \left (x \right ) b d e n x -2 \ln \left (e x +d \right ) b d e n x +\ln \left (x \right ) b \,d^{2} n -\ln \left (e x +d \right ) b \,d^{2} n -2 b \ln \left (c \,x^{n}\right ) d e x -b d e n x -2 a d e x -b \ln \left (c \,x^{n}\right ) d^{2}-b \,d^{2} n -a \,d^{2}}{2 e^{2} \left (e x +d \right )^{2} d}\) \(137\)
risch \(-\frac {b \left (2 e x +d \right ) \ln \left (x^{n}\right )}{2 \left (e x +d \right )^{2} e^{2}}-\frac {2 i \pi b d e x \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+2 i \pi b d e x \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b \,d^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+i \pi b \,d^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )-2 i \pi b d e x \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-2 i \pi b d e x \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+2 \ln \left (e x +d \right ) b \,e^{2} n \,x^{2}-2 \ln \left (-x \right ) b \,e^{2} n \,x^{2}+4 \ln \left (e x +d \right ) b d e n x -4 \ln \left (-x \right ) b d e n x +2 \ln \left (e x +d \right ) b \,d^{2} n -2 \ln \left (-x \right ) b \,d^{2} n +4 \ln \left (c \right ) b d e x +2 b d e n x +2 d^{2} b \ln \left (c \right )+4 a d e x +2 b \,d^{2} n +2 a \,d^{2}}{4 e^{2} d \left (e x +d \right )^{2}}\) \(349\)

[In]

int(x*(a+b*ln(c*x^n))/(e*x+d)^3,x,method=_RETURNVERBOSE)

[Out]

1/2*(ln(x)*b*e^2*n*x^2-ln(e*x+d)*b*e^2*n*x^2+2*ln(x)*b*d*e*n*x-2*ln(e*x+d)*b*d*e*n*x+ln(x)*b*d^2*n-ln(e*x+d)*b
*d^2*n-2*b*ln(c*x^n)*d*e*x-b*d*e*n*x-2*a*d*e*x-b*ln(c*x^n)*d^2-b*d^2*n-a*d^2)/e^2/(e*x+d)^2/d

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (56) = 112\).

Time = 0.29 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.85 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx=\frac {b e^{2} n x^{2} \log \left (x\right ) - b d^{2} n - a d^{2} - {\left (b d e n + 2 \, a d e\right )} x - {\left (b e^{2} n x^{2} + 2 \, b d e n x + b d^{2} n\right )} \log \left (e x + d\right ) - {\left (2 \, b d e x + b d^{2}\right )} \log \left (c\right )}{2 \, {\left (d e^{4} x^{2} + 2 \, d^{2} e^{3} x + d^{3} e^{2}\right )}} \]

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^3,x, algorithm="fricas")

[Out]

1/2*(b*e^2*n*x^2*log(x) - b*d^2*n - a*d^2 - (b*d*e*n + 2*a*d*e)*x - (b*e^2*n*x^2 + 2*b*d*e*n*x + b*d^2*n)*log(
e*x + d) - (2*b*d*e*x + b*d^2)*log(c))/(d*e^4*x^2 + 2*d^2*e^3*x + d^3*e^2)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 398 vs. \(2 (53) = 106\).

Time = 1.79 (sec) , antiderivative size = 398, normalized size of antiderivative = 6.42 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx=\begin {cases} \tilde {\infty } \left (- \frac {a}{x} - \frac {b n}{x} - \frac {b \log {\left (c x^{n} \right )}}{x}\right ) & \text {for}\: d = 0 \wedge e = 0 \\\frac {\frac {a x^{2}}{2} - \frac {b n x^{2}}{4} + \frac {b x^{2} \log {\left (c x^{n} \right )}}{2}}{d^{3}} & \text {for}\: e = 0 \\\frac {- \frac {a}{x} - \frac {b n}{x} - \frac {b \log {\left (c x^{n} \right )}}{x}}{e^{3}} & \text {for}\: d = 0 \\- \frac {a d^{2}}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {2 a d e x}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {b d^{2} n \log {\left (\frac {d}{e} + x \right )}}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {b d^{2} n}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {2 b d e n x \log {\left (\frac {d}{e} + x \right )}}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {b d e n x}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {b e^{2} n x^{2} \log {\left (\frac {d}{e} + x \right )}}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} + \frac {b e^{2} x^{2} \log {\left (c x^{n} \right )}}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} & \text {otherwise} \end {cases} \]

[In]

integrate(x*(a+b*ln(c*x**n))/(e*x+d)**3,x)

[Out]

Piecewise((zoo*(-a/x - b*n/x - b*log(c*x**n)/x), Eq(d, 0) & Eq(e, 0)), ((a*x**2/2 - b*n*x**2/4 + b*x**2*log(c*
x**n)/2)/d**3, Eq(e, 0)), ((-a/x - b*n/x - b*log(c*x**n)/x)/e**3, Eq(d, 0)), (-a*d**2/(2*d**3*e**2 + 4*d**2*e*
*3*x + 2*d*e**4*x**2) - 2*a*d*e*x/(2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2) - b*d**2*n*log(d/e + x)/(2*d**
3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2) - b*d**2*n/(2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2) - 2*b*d*e*n*x
*log(d/e + x)/(2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2) - b*d*e*n*x/(2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**
4*x**2) - b*e**2*n*x**2*log(d/e + x)/(2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2) + b*e**2*x**2*log(c*x**n)/(
2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 114 vs. \(2 (56) = 112\).

Time = 0.20 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.84 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx=-\frac {1}{2} \, b n {\left (\frac {1}{e^{3} x + d e^{2}} + \frac {\log \left (e x + d\right )}{d e^{2}} - \frac {\log \left (x\right )}{d e^{2}}\right )} - \frac {{\left (2 \, e x + d\right )} b \log \left (c x^{n}\right )}{2 \, {\left (e^{4} x^{2} + 2 \, d e^{3} x + d^{2} e^{2}\right )}} - \frac {{\left (2 \, e x + d\right )} a}{2 \, {\left (e^{4} x^{2} + 2 \, d e^{3} x + d^{2} e^{2}\right )}} \]

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^3,x, algorithm="maxima")

[Out]

-1/2*b*n*(1/(e^3*x + d*e^2) + log(e*x + d)/(d*e^2) - log(x)/(d*e^2)) - 1/2*(2*e*x + d)*b*log(c*x^n)/(e^4*x^2 +
 2*d*e^3*x + d^2*e^2) - 1/2*(2*e*x + d)*a/(e^4*x^2 + 2*d*e^3*x + d^2*e^2)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 124 vs. \(2 (56) = 112\).

Time = 0.32 (sec) , antiderivative size = 124, normalized size of antiderivative = 2.00 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx=-\frac {{\left (2 \, b e n x + b d n\right )} \log \left (x\right )}{2 \, {\left (e^{4} x^{2} + 2 \, d e^{3} x + d^{2} e^{2}\right )}} - \frac {b e n x + 2 \, b e x \log \left (c\right ) + b d n + 2 \, a e x + b d \log \left (c\right ) + a d}{2 \, {\left (e^{4} x^{2} + 2 \, d e^{3} x + d^{2} e^{2}\right )}} - \frac {b n \log \left (e x + d\right )}{2 \, d e^{2}} + \frac {b n \log \left (x\right )}{2 \, d e^{2}} \]

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^3,x, algorithm="giac")

[Out]

-1/2*(2*b*e*n*x + b*d*n)*log(x)/(e^4*x^2 + 2*d*e^3*x + d^2*e^2) - 1/2*(b*e*n*x + 2*b*e*x*log(c) + b*d*n + 2*a*
e*x + b*d*log(c) + a*d)/(e^4*x^2 + 2*d*e^3*x + d^2*e^2) - 1/2*b*n*log(e*x + d)/(d*e^2) + 1/2*b*n*log(x)/(d*e^2
)

Mupad [B] (verification not implemented)

Time = 0.76 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.74 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx=-\frac {a\,d+x\,\left (2\,a\,e+b\,e\,n\right )+b\,d\,n}{2\,d^2\,e^2+4\,d\,e^3\,x+2\,e^4\,x^2}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d}{2\,e^2}+\frac {b\,x}{e}\right )}{d^2+2\,d\,e\,x+e^2\,x^2}-\frac {b\,n\,\mathrm {atanh}\left (\frac {2\,e\,x}{d}+1\right )}{d\,e^2} \]

[In]

int((x*(a + b*log(c*x^n)))/(d + e*x)^3,x)

[Out]

- (a*d + x*(2*a*e + b*e*n) + b*d*n)/(2*d^2*e^2 + 2*e^4*x^2 + 4*d*e^3*x) - (log(c*x^n)*((b*d)/(2*e^2) + (b*x)/e
))/(d^2 + e^2*x^2 + 2*d*e*x) - (b*n*atanh((2*e*x)/d + 1))/(d*e^2)